package com.foo;

public class Box extends BaseGraphic{
	
	private final int length;
	private final int width;
	
	public Box( int length, int width, int x, int y){
		this.setLocation(new Point(x,y));
		
		this.length = length;
		this.width = width;
	}
	
	public Box( int length, int width){
		this.setLocation(new Point());
		
		this.length = length;
		this.width = width;
	}
	
	public Box(BoxBuilder boxBuilder) {
		this.length = boxBuilder.getLength();
		this.width = boxBuilder.getWidth();
	}

	public int getLength() {
		return length;
	}
	public int getWidth() {
		return width;
	}
	@Override
	public void draw(){
		System.out.println("Drawing " + this.toString());
	}

	@Override
	public double getArea() {
		return this.length * this.width;
	}


}
